<?php
class Search_mod extends CI_Model
{
	public function __construct()
	{
		parent::__construct();
	}
	
	public function getuserlist()
	{
		$sql = "SELECT * FROM `tms_admin`";
		$query = $this->db->query($sql);
		return $query->result_array();
	}
	
	public function wanchenListByuidWithstatus($uids,$stat)
	{
		if(empty($uids))
		{
			die("错误！！至少选择一个要查看的人");
		}
		
		if(is_array($uids))
		{
			$uid = implode(',',$uids);
		}else{$uid = $uids;}
		
		$sql = "SELECT * 
				FROM tms_task a
				JOIN tms_admin b ON a.uid = b.m_id
				WHERE a.uid in ($uid) and a.status = $stat";
		$query = $this->db->query($sql);
		return $query->result_array();
	}
}
?>